import request from "@/utils/request";

export function listRoomAll() {
  return request({
    url: "/room/listAll",
    method: "get",
  });
}
// 分页查询产品列表
export function listRoomByPage(query) {
  return request({
    url: '/room/page',
    method: 'get',
    params: query
  })
}
// 删除产品
export function delRoom(roomId) {
  return request({
    url: '/room/' + roomId,
    method: 'delete'
  })
}

// 查询产品详细
export function getRoom(roomId) {
  return request({
    url: '/room/' + roomId,
    method: 'get'
  })
}

// 新增产品
export function addRoom(data) {
  return request({
    url: '/room',
    method: 'post',
    data: data
  })
}

// 修改产品
export function updateRoom(data) {
  return request({
    url: '/room',
    method: 'put',
    data: data
  })
}